<%@ page language="java" import="java.util.*,Bean.User" pageEncoding="utf-8"%>
<html>
  <head>
   	<title>用户信息管理</title>
   	<style type="text/css">
   		a{
   			text-decoration: none;
   			color: red;
   		}
   	</style>
  </head>
  
  <body background="${pageContext.request.contextPath}/image/user.png" style=" background-repeat:no-repeat ;background-size:100% 100%;
		background-attachment: fixed;">
	<%
			ArrayList userList = (ArrayList)request.getAttribute("userList");
			
	%>
	<br>
	<div align="center" style="margin:20px auto; ">	  	
  	<form action="ShowAllUserServlet" method="post">
  		<font size="4" color="white">用户名：</font><input type="text" name="username">
  			<input type="submit" value="查询">
  	</form>
  	</div>
  	<p align="center">
  	<a href="/stu_info_manage_sys/addUser.jsp" style="color: white;"><font size="5">添加用户</font></a>
  	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  	<a href="/stu_info_manage_sys/index.jsp" style="color: white;"><font size="5">返回首页</font></a>
  	</p><br>
	<hr><br><br>
  	<div align="center" >
  		<table border="1" width="50%" style="color: white;">
		<tr align="center">
			<td>用户名</td>
			<td>密码</td>
			<td>性别</td>
			<td>邮箱</td>
			<td>数据操作</td>
			<td>数据操作</td>
		</tr>
		<%
			for(int i = 0;i<userList.size();i++){
				User user =(User)userList.get(i);
		 %>
		 <tr align="center">
		 	<td><%=user.getUsername()%></td>
		 	<td><%=user.getPassword()%></td>
		 	<td><%=user.getUsex()%></td>
		 	<td><%=user.getMail()%></td>
		 	<td> 
		 	<a href="/stu_info_manage_sys/updateUser.jsp?userid=<%=user.getUserid()%>
		 	&username=<%=user.getUsername()%>&password=<%=user.getPassword()%>
			&usex=<%=user.getUsex()%>&mail=<%=user.getMail()%>">修改</a> </td>
		 	<td> <a href="/stu_info_manage_sys/servlet/DeleteUserServlet?userid=<%=user.getUserid()%>">删除</a> </td>
		 </tr>
		 <%
		 	}
		  %>
  		</table>
  	</div>
  	
  </body>
</html>
